//
// Created by wkm on 2024-04-25.
//

#include "aes128_driver.h"

void aes128_driver::prc_aes128_driver() {
    wait();
    wait();
    d_reset.write(true);
    wait();
    d_reset.write(false);
    wait();
    d_pt1.write(0xaa);
    d_pt2.write(0xbb);
    d_pt3.write(0xcc);
    d_pt4.write(0xdd);
    d_pt5.write(0xee);
    d_pt6.write(0xff);
    d_pt7.write(0x00);
    d_pt8.write(0x11);
    d_pt9.write(0x22);
    d_pt10.write(0x33);
    d_pt11.write(0x44);
    d_pt12.write(0x55);
    d_pt13.write(0x66);
    d_pt14.write(0x77);
    d_pt15.write(0x88);
    d_pt16.write(0x99);

    d_key1.write(0xaa);
    d_key2.write(0xbb);
    d_key3.write(0xcc);
    d_key4.write(0xdd);
    d_key5.write(0xee);
    d_key6.write(0xff);
    d_key7.write(0x00);
    d_key8.write(0x11);
    d_key9.write(0x22);
    d_key10.write(0x33);
    d_key11.write(0x44);
    d_key12.write(0x55);
    d_key13.write(0x66);
    d_key14.write(0x77);
    d_key15.write(0x88);
    d_key16.write(0x99);
    wait();
    wait();
    wait();
    d_start.write(true);
    wait();
    wait();
//    d_start.write(false);
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    wait();
    sc_stop();
}